package com.straw.hat.dubbo.cousumer;

import com.straw.hat.dubbo.cousumer.service.UserService;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @company: 鲸灵科技
 * @author: qiyue@webuy.ai
 * @date: 2019/10/3
 * @time: 1:11 下午
 */
@SpringBootApplication
@EnableDubbo(scanBasePackages = "com.straw.hat.dubbo.cousumer.service")
@RestController
@RequestMapping(value = "/")
public class DubboConsumerApplication {
    @Autowired
    private UserService userService;
    public static void main(String[] args) {
        SpringApplication.run(DubboConsumerApplication.class, args);
    }

    @GetMapping(value = "user")
    public String testGetUset(){
        return userService.findUserInfo();
    }

}
